﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MyEvent
{
    public class Student
    {
        public event Action<Book> StudentEvent;
        public void NoBook(Book book)
        {
            if (book.BookCount > 0)
            {
                book.BookCount--;
                StudentEvent = Program.Prosucceed;
            }
            else
            {
                StudentEvent = Program.ProNoThing;
            }
            StudentEvent += Program.ProAll;
            StudentEvent?.Invoke(book);
        }
    }
}
